{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Theil Sen Regression"
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "Theil Sen Regression is an algorithm that choose the median of the slopes of all lines through pairs of points. Also, it involves in fitting multiple regression models on subsets of the training data and combining the coefficients together in the end."
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import pandas as pd\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "# yahoo finance is used to fetch data \n",
        "import yfinance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:31.457Z",
          "iopub.execute_input": "2021-09-12T04:13:31.463Z",
          "shell.execute_reply": "2021-09-12T04:13:31.865Z",
          "iopub.status.idle": "2021-09-12T04:13:31.839Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2014-01-01'\n",
        "end = '2018-08-27'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# View Columns\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 completed\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": "            Open  High   Low  Close  Adj Close    Volume\nDate                                                    \n2014-01-02  3.85  3.98  3.84   3.95       3.95  20548400\n2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200\n2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300\n2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100\n2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-02</th>\n      <td>3.85</td>\n      <td>3.98</td>\n      <td>3.84</td>\n      <td>3.95</td>\n      <td>3.95</td>\n      <td>20548400</td>\n    </tr>\n    <tr>\n      <th>2014-01-03</th>\n      <td>3.98</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>22887200</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.01</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>42398300</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.19</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>42932100</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.23</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>30678700</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:31.850Z",
          "iopub.execute_input": "2021-09-12T04:13:31.856Z",
          "iopub.status.idle": "2021-09-12T04:13:32.840Z",
          "shell.execute_reply": "2021-09-12T04:13:32.980Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create more data\n",
        "dataset['Increase_Decrease'] = np.where(dataset['Volume'].shift(-1) > dataset['Volume'],1,0)\n",
        "dataset['Buy_Sell_on_Open'] = np.where(dataset['Open'].shift(-1) > dataset['Open'],1,-1)\n",
        "dataset['Buy_Sell'] = np.where(dataset['Adj Close'].shift(-1) > dataset['Adj Close'],1,-1)\n",
        "dataset['Return'] = dataset['Adj Close'].pct_change()\n",
        "dataset = dataset.dropna()\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 3,
          "data": {
            "text/plain": "            Open  High   Low  Close  Adj Close    Volume  Increase_Decrease  \\\nDate                                                                          \n2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200                  1   \n2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300                  1   \n2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100                  0   \n2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700                  0   \n2014-01-09  4.20  4.23  4.05   4.09       4.09  30667600                  0   \n\n            Buy_Sell_on_Open  Buy_Sell    Return  \nDate                                              \n2014-01-03                 1         1  0.012658  \n2014-01-06                 1         1  0.032500  \n2014-01-07                 1        -1  0.012106  \n2014-01-08                -1        -1  0.000000  \n2014-01-09                -1         1 -0.021531  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Return</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-03</th>\n      <td>3.98</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>22887200</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.012658</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.01</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>42398300</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.032500</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.19</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>42932100</td>\n      <td>0</td>\n      <td>1</td>\n      <td>-1</td>\n      <td>0.012106</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.23</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>30678700</td>\n      <td>0</td>\n      <td>-1</td>\n      <td>-1</td>\n      <td>0.000000</td>\n    </tr>\n    <tr>\n      <th>2014-01-09</th>\n      <td>4.20</td>\n      <td>4.23</td>\n      <td>4.05</td>\n      <td>4.09</td>\n      <td>4.09</td>\n      <td>30667600</td>\n      <td>0</td>\n      <td>-1</td>\n      <td>1</td>\n      <td>-0.021531</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:32.851Z",
          "iopub.execute_input": "2021-09-12T04:13:32.857Z",
          "shell.execute_reply": "2021-09-12T04:13:32.985Z",
          "iopub.status.idle": "2021-09-12T04:13:32.871Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": "(1170, 10)"
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:32.879Z",
          "iopub.execute_input": "2021-09-12T04:13:32.885Z",
          "iopub.status.idle": "2021-09-12T04:13:32.899Z",
          "shell.execute_reply": "2021-09-12T04:13:32.990Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = dataset['Open']\n",
        "y = dataset['Adj Close'] "
      ],
      "outputs": [],
      "execution_count": 5,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:32.908Z",
          "iopub.execute_input": "2021-09-12T04:13:32.913Z",
          "iopub.status.idle": "2021-09-12T04:13:32.924Z",
          "shell.execute_reply": "2021-09-12T04:13:32.994Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = np.array(X).reshape(1170,-1)\n",
        "y = np.array(y).reshape(1170,-1)"
      ],
      "outputs": [],
      "execution_count": 6,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:32.933Z",
          "iopub.execute_input": "2021-09-12T04:13:32.937Z",
          "iopub.status.idle": "2021-09-12T04:13:32.947Z",
          "shell.execute_reply": "2021-09-12T04:13:32.998Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.linear_model import TheilSenRegressor\n",
        "from sklearn.model_selection import cross_val_score\n",
        "from sklearn.model_selection import RepeatedKFold\n",
        "from numpy import absolute, arange"
      ],
      "outputs": [],
      "execution_count": 7,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:32.955Z",
          "iopub.execute_input": "2021-09-12T04:13:32.962Z",
          "shell.execute_reply": "2021-09-12T04:13:33.186Z",
          "iopub.status.idle": "2021-09-12T04:13:33.176Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Define the model\n",
        "model = TheilSenRegressor()\n",
        "# Define model evaluation\n",
        "cv = RepeatedKFold(n_splits=10, n_repeats=3, random_state=1)\n",
        "# Evaluate model\n",
        "scores = cross_val_score(model, X, y, scoring='neg_mean_absolute_error', cv=cv, n_jobs=-1)\n",
        "# Change scores to be positive\n",
        "scores = absolute(scores)\n",
        " "
      ],
      "outputs": [],
      "execution_count": 8,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:33.212Z",
          "iopub.execute_input": "2021-09-12T04:13:33.219Z",
          "shell.execute_reply": "2021-09-12T04:13:38.084Z",
          "iopub.status.idle": "2021-09-12T04:13:38.069Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.fit(X, y)\n",
        "plt.scatter(X,y)\n",
        "xaxis = arange(X.min(), X.max(), 0.01)\n",
        "y_pred = model.predict(xaxis.reshape((len(xaxis), 1)))\n",
        "plt.plot(xaxis, y_pred, color='r')\n",
        "plt.title('Theil Sen Regression for Stock Price')\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": "<Figure size 432x288 with 1 Axes>",
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X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f78rBWRG8uyj2VFRBqIyCIR2SAi60XkSXu7fnZsGtBLT2djTCutlwVgBpB/4dchwHfGmPOB7+yfw9EMCr42AK/Zn59WxphvS7lPgSIbeNYYcwHQDnhURC5EPzunaUBXpc4YsxQ4kG9zD+B9+/v3gZ6l2qkA4eG1UYAxJt0Ys8b+/giwAYhFPzunaUAvHQaYJyKrRaR/WXcmQNUxxqSD9R8XqF3G/Qk0j4nIOjslE7YpBScRaQS0Blain53TNKCXjg7GmDbADVh/Jl5Z1h1SQWUK0BhoBaQDr5Rtd8qWiFQGZgNPGWMOl3V/AokG9FJgjNlpf90DzAEuLdseBaTdIlIXwP66p4z7EzCMMbuNMTnGmFzgbcL48yMiDqxgPtMY86W9WT87Ng3oJUxEKolIFef3wHXAL94fFZbmAvfZ398H/F8Z9iWgOIOV7R+E6edHRASYDmwwxrzqsks/OzYdKVrCRORcrKtysBbl/tgYM64Mu1TmRGQW0Alr2tPdwEggEfgMiAO2A7cZY8Lu5qCH16YTVrrFAFuBh50543AiIlcA3wOpQK69eRhWHj3sPzugAV0ppUKGplyUUipEaEBXSqkQoQFdKaVChAZ0pZQKERrQlVIqRGhAV0qpEKEBXSmlQsT/AzOR5vaUwxaQAAAAAElFTkSuQmCC\n"
          },
          "metadata": {
            "needs_background": "light"
          }
        }
      ],
      "execution_count": 9,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:38.075Z",
          "iopub.execute_input": "2021-09-12T04:13:38.080Z",
          "shell.execute_reply": "2021-09-12T04:13:38.524Z",
          "iopub.status.idle": "2021-09-12T04:13:38.497Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "def evaluate_model(X, y, model):\n",
        "\t# Define model evaluation\n",
        "\tcv = RepeatedKFold(n_splits=10, n_repeats=3, random_state=1)\n",
        "\t# Evaluate model\n",
        "\tscores = cross_val_score(model, X, y, scoring='neg_mean_absolute_error', cv=cv, n_jobs=-1)\n",
        "\t# Scores to be positive\n",
        "\treturn absolute(scores)"
      ],
      "outputs": [],
      "execution_count": 10,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:38.504Z",
          "iopub.execute_input": "2021-09-12T04:13:38.508Z",
          "iopub.status.idle": "2021-09-12T04:13:38.516Z",
          "shell.execute_reply": "2021-09-12T04:13:38.529Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "results = evaluate_model(X, y, model) \n",
        "print('Average MAE: %.3f (%.3f)' % (results.mean(), results.std())) "
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Average MAE: 0.146 (0.019)\n"
          ]
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:38.548Z",
          "iopub.execute_input": "2021-09-12T04:13:38.554Z",
          "iopub.status.idle": "2021-09-12T04:13:43.717Z",
          "shell.execute_reply": "2021-09-12T04:13:43.707Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.coef_"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 12,
          "data": {
            "text/plain": "array([0.99828252])"
          },
          "metadata": {}
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:43.725Z",
          "iopub.execute_input": "2021-09-12T04:13:43.731Z",
          "iopub.status.idle": "2021-09-12T04:13:43.742Z",
          "shell.execute_reply": "2021-09-12T04:13:43.820Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.intercept_"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 13,
          "data": {
            "text/plain": "0.0038389704363594127"
          },
          "metadata": {}
        }
      ],
      "execution_count": 13,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:43.749Z",
          "iopub.execute_input": "2021-09-12T04:13:43.754Z",
          "iopub.status.idle": "2021-09-12T04:13:43.765Z",
          "shell.execute_reply": "2021-09-12T04:13:43.823Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.predict(y)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 14,
          "data": {
            "text/plain": "array([ 3.99696907,  4.12674591,  4.17665975, ..., 20.86794335,\n       22.25555735, 23.94265345])"
          },
          "metadata": {}
        }
      ],
      "execution_count": 14,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:43.772Z",
          "iopub.execute_input": "2021-09-12T04:13:43.777Z",
          "iopub.status.idle": "2021-09-12T04:13:43.787Z",
          "shell.execute_reply": "2021-09-12T04:13:43.826Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import r2_score \n",
        "r2_score(X,y)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 15,
          "data": {
            "text/plain": "0.9976522993458272"
          },
          "metadata": {}
        }
      ],
      "execution_count": 15,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-12T04:13:43.796Z",
          "iopub.execute_input": "2021-09-12T04:13:43.801Z",
          "iopub.status.idle": "2021-09-12T04:13:43.812Z",
          "shell.execute_reply": "2021-09-12T04:13:43.829Z"
        }
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.6.13",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "nteract": {
      "version": "0.28.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 4
}